package org.boot.myledger.util;


import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author liupy
 * 返回工具类
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class ResultUtil {
    /**
     * 是否成功
     */
    private boolean success;

    /**
     * 返回数据
     */
    private Object data;

    /**
     * 返回状态码
     */
    private int code;

    /**
     * 返回信息
     */
    private String message;

    public ResultUtil(int code, Object data, String message) {
        this.code = code;
        this.data = data;
        this.message = message;
    }

    public ResultUtil(int code, Object data) {
        this.code = code;
        this.data = data;
    }
}
